﻿using System;
using System.Windows.Forms;
using CXMLStudioIDE.Common.Entities;
using CXMLStudioIDE.Forms;
using CXMLStudioIDE.WinFormsUI.CXMLStudioControls;

namespace CXMLStudioIDE.Views
{
    public interface IGoldEntryView
    {
        #region Properties

        int EntityID { get; }
        string xml_SerializedEntity { get; set; }
        object EntityInstance { get; set; }
        Type EntityType { get; set; }
        BusinessEntity RootBusinessEntity { get; set; }
        object SelectedItem { get; }
        CXMLTreeNode RootCXMLNode { get; set; }
        bool IsInstanceToAdd { get; set; }
        GoldEntryForm CallingGoldForm { get; set; }
        CXMLTreeNode CallingCXMLNode { get; set; }
        CXMLTreeNode AddedCXMLNode { get; set; }
        MainForm ParentMainForm { get; set; }
        string EntityInstanceDescription { get; set; }
        AddInstanceForm.AddInstanceMode AddInstanceMode { get; set; }

        #endregion

        #region Methods

        void SelectByLineage(string lineage, bool setfocus);
        void ReleaseBindings();
        void SetBindingSource();
        void LoadInstanceCombo(int EntityID);
        void LoadGoldForm(CXMLTreeNode node);
        void EnableAddInstanceButton();
        string GetValueByLineage(string lineage);
        string GetValueByBindingName(object instance, string BindingName);
        void AddInstance(object instance, string listpropertyname, CXMLTreeNode addednode);
        void ClearAllFields();

        #endregion

        #region Events

        event FormClosingEventHandler OnFormClosing;
        event EventHandler OnInstancePreviewClicked;
        event EventHandler OnSaveInstanceClicked;
        event EventHandler OnLoadInstanceClicked;
        event EventHandler OnAddToParentClicked;
        event CXMLStudioIDE.Forms.GoldEntryForm.OnFileSelectedEventHandler OnFileSelected;

        #endregion
    }
}